package cn.com.css.taxInspection.gt3.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cn.com.css.taxInspection.common.result.DataResult;
import cn.com.css.taxInspection.gt3.entity.JcSyAjjbxxZsEntity;
import cn.com.css.taxInspection.gt3.mapper.JcSyAjjbxxZsMapper;
import cn.com.css.taxInspection.gt3.service.JcSyAjjbxxZsService;
import cn.com.css.taxInspection.workquality.vo.req.StatisticsInspectHearReqVo;

@Service("jcSyAjjbxxZsService")
public class JcSyAjjbxxZsServiceImpl extends ServiceImpl<JcSyAjjbxxZsMapper, JcSyAjjbxxZsEntity>
		implements JcSyAjjbxxZsService {

	@Autowired
	private JcSyAjjbxxZsMapper jcSyAjjbxxZsMapper;

	@Override
	public DataResult getStatisticsInspect(JcSyAjjbxxZsEntity jcSyAjjbxxZs) {
		List<StatisticsInspectHearReqVo> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspect(
				jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
		return DataResult.success(statisticsInspect);

	}

	@DS("oracle")
	@Override
	public DataResult getStatisticsHear(JcSyAjjbxxZsEntity jcSyAjjbxxZs) {

		return DataResult.success(jcSyAjjbxxZsMapper.getStatisticsHear(jcSyAjjbxxZs.getCreateStart(),
				jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode()));

	}

	@DS("oracle")
	@Override
	public DataResult getinspectHearDetail(JcSyAjjbxxZsEntity jcSyAjjbxxZs) {

		String mark = jcSyAjjbxxZs.getMark();
		
		if (mark.equals("ypJckz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectYpJckz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("dpJckz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectDpJckz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("tjJckz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectTjJckz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("jjJckz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectJjJckz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("ypJz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectYpJz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("dpJz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectDpJz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("tgJz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectTgJz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("jjJz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectJjJz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("sslSs")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectSslSs(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("sslTg")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectSslTg(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
		} else if (mark.equals("sslJj")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectSslJj(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			return DataResult.success(statisticsInspect);
			
			
		} else if (mark.equals("ypFs")) {
			
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectYpFs(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("dpFs")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectDpFs(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);		
		} else if (mark.equals("tjFs")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectTjFs(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("jjFs")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectJjFs(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("ypKz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectYpKz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("dpKz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectDpKz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("tjKz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectTjKz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("jjKz")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectJjKz(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("ypJzsl")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectYpJzsl(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("dpJzsl")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectDpJzsl(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("tgJzsl")) {			
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectTgJzsl(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("jjJzsl")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectJjJzsl(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("fjTg")) {
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectFjTg(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else if (mark.equals("fjJj")) {	
			List<JcSyAjjbxxZsEntity> statisticsInspect = jcSyAjjbxxZsMapper.getStatisticsInspectFjJj(
					jcSyAjjbxxZs.getCreateStart(), jcSyAjjbxxZs.getCreateEnd(), jcSyAjjbxxZs.getTaxorgcode());
			
			return DataResult.success(statisticsInspect);
		} else {
			return DataResult.fail("mark值不正确！");

		}

		
	}

}